package com.service.impl;

import com.bean.Building;
import com.dao.impl.BuildingDAOImpl;
import com.service.BuildingService;

import java.sql.SQLException;
import java.util.List;

public class BuildingServiceImpl implements BuildingService {

    BuildingDAOImpl buidingDAO = new BuildingDAOImpl();

    @Override
    public List<Building> selectAll() throws SQLException {
        return buidingDAO.selectAll();
    }
    @Override
    public boolean deleteById(Integer id) throws SQLException {
        return buidingDAO.deleteById(id);
    }
    @Override
    public boolean removeAll(String[] idsArr) throws SQLException {
        return buidingDAO.deleteAll(idsArr);
    }
    @Override
    public boolean insert(Building b) throws SQLException {
        return buidingDAO.insert(b);
    }
    @Override
    public boolean update(Building b) throws SQLException {
        return buidingDAO.update(b);
    }

    @Override
    public Integer count() throws SQLException {
        return buidingDAO.count();
    }
    @Override
    public Integer countSearch(String search) throws SQLException {
        return buidingDAO.countSearch(search);
    }

    @Override
    public List<Building> selectAllPagination(Integer offset, Integer limit) throws SQLException {
        return buidingDAO.selectAllPagination(offset,limit);
    }
    @Override
    public List<Building> selectAllPaginationSearch(Integer offset, Integer limit, String search) throws SQLException {
        return buidingDAO.selectAllPaginationSearch(offset,limit,search);
    }


}
